Data converters are used, in the general sense, to convert data in one format to another format such as converting data in a continuous format to data in a discrete format while preserving enough information so that the discrete data are useful. A continuous time varying signal has a unique amplitude value for every instant in time. When that signal is quantized to form a discrete signal, a range of time values are assigned a common amplitude. Thus, some amplitude and time information is lost in the conversion process.
Obviously, for the digitization of a signal to be a desirable process, some information must also be preserved. Specifically, at the most basic level, the preserved information is the moment in time at which the amplitude of the input signal passes through the predetermined quantization levels of the converter. The amount of preserved information, or the resolution of the information, depends largely upon the specific application to which the conversion process is directed to. In audio applications, for example, the goal is to reconstruct the original input signal quantized by the converter. Thus, the resolution is relatively high. In other applications, the goal may not be to reconstruct the original signal, but merely to measure certain characteristics in the signal. For example, the time values at which the input signal transitions from one quantization level to another. Here, since the original signal does not have to be recreated, the resolution of the converter need only be high enough to satisfy the needs of the particular measurement.
As an example of a converter having a low resolution, assume that it is desired to measure the time values at which a sine wave, or quasi-sine wave, pass through ground potential (i.e. pass from positive to negative and from negative to positive). A common approach is to use a comparator (a specialized operational amplifier designed to compare two input voltages) which produces a binary signal (i.e., a two-level logic signal) in response to the relative values of the input voltages. Such a converter would have one of its inputs connected to ground, to provide a reference, and its other input connected to the input signal. The output of the comparator will be one binary value (for example, "LOW") when the input signal is more negative than the reference, and it will be another value (for example "HIGH") when the input signal is more positive than the reference.
As is often the case in measurement and instrumentation systems, the input signal is produced by taking an "electronic photograph" of a physical system. The analog signal produced (i.e. the input signal to the converter) is an approximation of the physical system. For example, an electrocardiogram is a electronic approximation of the electrical potential created by a beating heart. Similarly, in bar code readers, by passing a sensing wand over a bar code, an electronic approximation of the graphical representation of that bar code is formed. Thus, the analog signal, or input signal to the data converter, is the product of a conversion process itself; specifically, the conversion from a "physical system" format to an electronic format. This conversion produces abnormalities in the analog signal which must be compensated for in the data conversion process if the information originally existing in the physical system is to be properly interpreted.
Considerable reference will be made herein to printed bar code tags since they serve as a easily understandable example of problems encountered in data conversion devices. A bar code tag, such as the one shown in FIG. 1, uses a plurality of dark and light areas (bar code elements) to convey information. In the accepted convention, the dark areas are referred to as bars 11, and the light areas are referred to as spaces 12. Information is typically carried in the width of the bars as well as the width of the spaces. For example, FIG. 1 shows a bar code tag using the 3 of 9 alphanumeric code. Each character has five bars and four spaces, where each bar and space can have a value of zero (narrow) or one (wide). Therefore, errors in interpreting whether a particular code element if dark or light, as well as errors in interpreting where the boundary of an element exists will result in errors in reading the bar code. In addition to the characters, many bar code formats also have a margin area 14 adjacent to the ends of the bar code.
Bar code tags are scanned by moving a small spot of light across the bars and spaces. The output of the scanner is determined by the relative amounts of light that are reflected from the bars and spaces back into the scanner. It is this signal, the scanner output signal, which provides the input signal for the data converter. Generally, the pigmented portions of the bar code tag (the bars) reflect a low level of light while the non-pigmented portions (the spaces) reflect a relatively high level of light. The small size of the illuminated area make the scanner, and the data converter, more sensitive to printing flaws than the naked eye.
Bar code tags can be printed in a variety of ways and on a variety of media. The most commonly used media in industrial applications are adhesive labels, cards, and documents. However, tags are printed on other types of media, such as aluminum cans or plastic merchandising containers. Since the medium is an optical storage device, the optical characteristics of the medium affect the scanner output signal and, in turn, affect the requirements of the data converter. For example the surface reflectivity of the medium will affect the contrast between the medium (usually the spaces) and the ink (usually the bars) and thus affect the amplitude of the scanner output signal. The reflected radiation pattern will also affect the amplitude of the scanner output signal. For example, where the medium reflects light in a diffuse pattern, rather than a narrow pattern, the output signal of the scanner is less affected by large scan angles. The scan angle is the angle at which the bar code is scanned by the light emitting scanning device. At small scanning angles, the light tends to reflect back toward the scanner, while at large scanning angles the light tends to reflect away from the scanner.
The effectiveness of the bar code can also be affected by the printing process used. High print quality can be obtained by using lithographic, offset printing, ink jet, or other similar printing processes. Low print quality is often the result of dot matrix printing or poorly inked ribbons in drum or daisy wheel printing processes.
In bar code reader systems, as in other conversion systems, the data converter must be able to detect the level of the input signal, and the time values associated with the change of the input signal between levels. For example, assume that in a bar code system, the scanner scans a space followed by a bar followed by a space. The resulting output from the scanner will be an analog signal having a relatively higher value (corresponding to the large reflectivity of the space) followed by a relatively lower value followed by another relatively high value. The converter must be able to distinguish the lower values from the higher values and produce a binary signal having binary HIGHs and LOWs corresponding to the analog signal. The converter must also faithfully reproduce the pulse widths of the signal proportionately to the respective widths of the bar code tag's bars and spaces. This is important since most bar codes use the widths of the bars and spaces to convey information.
The zero crossing detector as described above would be substantially sufficient as a converter for a bar code reader system if the input signal always had a reference voltage equal to zero volts. However, since the relative values of the analog input signal can vary depending on the various optical characteristics of the bar code tags outlined above, more flexible circuits must be utilized to decode the input signal.
In the past, converter circuits for converting an analog signal into a one-bit binary signal have been of the delta detector type or the peak detector type. An example of a delta detector is shown in FIG. 2. The circuit comprises a comparator 16 having the input signal connected to one of its inputs (in FIG. 2, the input signal is connected to the non-inverting input to the comparator). The other input to the comparator is connected to one electrode of a capacitor 17, the other electrode of which is connected to ground. Two diodes 18, are connected, in opposite directions between the inputs of the comparator. The diodes and the capacitor provide a threshold voltage used to reference the analog input signal. Because of the diodes, the threshold voltage is never closer to the extreme values of the analog input signal than one diode drop. When the analog input signal has a relatively high value, then the threshold voltage changes to approach a value one diode drop below the value of the analog input signal. Since the non-inverting input of the comparator is higher than the inverting input, the output of the comparator is HIGH. When the analog input signal transitions to its lower level, the non-inverting input of the comparator falls below the threshold voltage, thus causing the comparator output to switch from HIGH to LOW. Also, the capacitor voltage begins to charge to a value of approximately one diode drop above the analog input signal. The rate at which the capacitor charges and discharges is controlled by the value of the capacitor.
FIG. 3 shows an exemplary prior art peak detector converter. Similarly to the delta detector, in the peak detector converter, the non-inverting input to a comparator is connected to the analog input signal. The inverting input of the comparator 19 is connected to the threshold voltage 21. However, in this circuit, the threshold voltage is provided by a voltage divider connected between the outputs of a pair of peak detectors, one a positive peak detector 22 and the other a negative peak detector 23. The positive peak detector stores the most positive value of the analog input signal while the negative peak detector stores the most negative value of the input signal. The threshold voltage is then derived by dividing the voltage between the outputs of the positive and negative peak detectors. Since the threshold voltage is generally between the peaks of the input signal, the output of the comparator will switch each time the analog input signal transitions between its higher and lower values.
Particular problems related to the measurement of any physical system can be visualized by reference to a few examples regarding bar codes. Similarly, the operation of the prior art converters described above can be described in more detail with reference to the same examples.
One aspect of measuring bar code tags involves the floating reference of the tag. In the zero-crossing detector example cited above the sine wave input has a reference of zero volts. Where the sine wave is created by a function generator or other electrical system having a known reference voltage, the value of the reference input to the comparator is easily determined. However, in the bar code shown in FIG. 1, only the extreme values of the code are known; the code is either black or it is white. There is no "gray" reference value with which to compare the black and white. Similarly, when the bar code is read by the electrical device, the signal is either high (usually indicating a space) or it is low (usually indicating a bar). The code itself does not provide a reference with which to judge when the signal transitions from low to high or from high to low. Rather, the converter must derive the appropriate reference point based on the input values.
A second characteristic of bar code tags which dictate the effectiveness of the data converter is the contrast of the tag, or, more specifically, the contrast between the bars and the spaces on the tag. A bar code tag having a high contrast will usually result in an analog input signal with large amplitude peak to peak values. However, for example, where the bars in a bar code are black and the spaces are dark gray, the input signal generated by reading the code will have a small peak to peak voltage. A similar result occurs where the spaces are white but the bars are gray. Low contrast bar code tags occur for various reasons. For example, the originally high contrast of a tag can be lowered where it is photocopied one or several times using low quality equipment. Also, low contrast tags occur when the tag is printed using colors. Some colors that are obviously different to the human eye (because light reflected from them have different wavelengths) do not appear to be different to an optical bar code reader (because the amplitude of the reflected light is similar). This phenomenon occurs, for example, where brown bars are printed on a yellow background. The contrast of originally high contrast tags can also be diminished by exposure to "the elements" such as sunlight, water or other elements which may coat or smear the tag.
Delta detector type converters typically cannot decode a signal created by scanning a low contrast tag. Because of the low contrast, the peak to peak voltage of the analog input signal is small. However, the delta detector converter requires the peak to peak voltage to be approximately equal to two forward voltage diode drops. In other words, the input signal must be larger than the voltage drop across the diode or the diodes will not conduct, and the threshold voltage will not adjust accordingly.
Other defects in the printed tags can result in amplitude modulation of the derived input signal. For example, low frequency modulation occurs where the peak values of the input signal vary over the length of the scan. Low frequency modulation can occur under varying conditions. For example, where the print quality of the tag varies over the length of the bar code the result will be an analog input signal which varies in amplitude. Typically this problem is caused by smearing or fading of a portion of the tag or by a poor printing process, such as printing with a ribbon which has a poorly inked area on it. Here, one portion of the tag may have a high contrast, while another portion of the tag may have a low contrast. Another common cause of low frequency amplitude modulation is what is commonly referred to as roll angle error. Roll angle error is caused by varying the angle with which the optical scanner scans the bar code tag. This often occurs when a person is responsible for providing the scanning mechanism since it is generally unnatural for a person to move their arm or hand in a precisely linear fashion. Some systems require a person to scan a stationary bar code tag with a light wand. Other systems require the person to move the bar code tag in relation to a stationary optical sensor.
When a peak detector type converter is used in scanning a tag with varying contrasts, the converter has a tendency to distort the true pulse widths of the analog signal. This occurs because once the peak detectors are set, their values do not change appreciably during scanning. Since the threshold voltage is determined according to the values of the peak detectors, it too may not change in response to the changing peak values of the input signal. If the threshold voltage is too far from the center of the peaks of the input signal, the pulse widths of the resultant comparator output will be distorted.
High frequency amplitude modulation, or in other words noise, can appear on the input signal derived from scanning tags having poor graphic resolution. This often occurs on bar code tags printed with a dot matrix printer. These poorly printed tags may contain small white areas within the boundaries of a bar or small black areas within the boundaries of a space. Although the eye can easily tell what the bar code is supposed to be, regardless of the impurities, the bar code reader has a more difficult problem of it. This is because the eye has the benefit of the entire lateral dimension of the bar code to determine the values of the bars and spaces. On the other hand, the bar code reader takes a one-dimensional slice along the longitudinal dimension of the tag. Thus when a light space is encountered, the reader cannot tell whether it is an impurity within a bar, or whether it is the beginning of a space.
Another source of noise is called white paper noise. In the peak detector converter shown in FIG. 3, when the scanner is placed on white paper, for example in the margin next to the bar code, the peak detectors tend to converge to the same value since the capacitors in each peak detector are allowed to discharge. Movement of the scanner along the white paper will result in small amplitude signals being input into the converter circuit. Since the threshold is now so close to the "white" peak, small impurities, even those invisible to the naked eye, will trigger the comparator. If these pulses occur within ten elements of the first bar of the tag, the decoder may create an error.